﻿using Esri.ArcGISRuntime.Mapping;
using PropertyChanged;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ColiyerWpfControl.Gis.ViewModel
{
    internal class SimpleMapViewModel : ControlViewModel
    {
        public Map Mapping { get; set; } = new Map() { MinScale = 73957190.948944 };
        [OnChangedMethod(nameof(OnGeoLayerChanged))]
        public Layer GeoLayer { get; set; }

        private void OnGeoLayerChanged()
        {
            Mapping.OperationalLayers.Clear();

            Mapping.OperationalLayers.Add(GeoLayer);
        }
    }
}
